package com.gutai.admin.common.entity.response;

/**
 * 
 * 
 * 
 * <pre>
 * HISTORY
 * ****************************************************************************
 *  ID    DATE            PERSON            REASON
 *  1     2019年1月22日         la.01367604           Create
 * ****************************************************************************
 * </pre>
 * 
 * @author la.01367604
 * @version 1.0
 */
public class MiniProResponse {

    private Integer errno;
    private String errmsg;
    private Object data;

    public MiniProResponse(Integer errno, String errmsg, Object data) {
        super();
        this.errno = errno;
        this.errmsg = errmsg;
        this.data = data;
    }

    public Integer getErrno() {
        return errno;
    }

    public void setErrno(Integer errno) {
        this.errno = errno;
    }

    public String getErrmsg() {
        return errmsg;
    }

    public void setErrmsg(String errmsg) {
        this.errmsg = errmsg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static MiniProResponse success(Object data) {
        return new MiniProResponse(0, "", data);
    }

    public static MiniProResponse fail(Integer errNo, String errmsg) {
        return new MiniProResponse(errNo, errmsg, null);
    }
}
